<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
    <title>订单管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript" src="${ctx}/static/js/jquery.min.js"></script>
    <link rel="stylesheet" href="${ctx}/static/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/dataTables.bootstra.css">
    <style>
        body {
            padding-top: 50px;
        }
    </style>
</head>
<body>
<nav class="navbar navbar-inverse  navbar-fixed-top" role="navigation">
    <div class="navbar-header">
        <a class="navbar-brand">订单管理</a>
    </div>
    <ul class="nav navbar-nav">
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">导入 <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
                <li><a href="${ctx}/management/order/toImport.do">导入Excel</a></li>
                <li class="divider"></li>
                <li><a href="${ctx}/management/order/downloadExcelTemplate.do">下载Excel模板</a></li>
            </ul>
        </li>
    </ul>

    <div class="container-fluid">
        <form class="navbar-form navbar-left" role="search" method="post" action="${ctx}/management/order.do">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="请输入姓名" name="userName" id="user_name"
                       value="${userName}">
                <input type="text" class="form-control" placeholder="请输入单号" name="postNo" id="post_no"
                       value="${postNo}">
            </div>
            <button type="submit" class="btn btn-default icon-search">搜索</button>
        </form>
        <ul class="nav navbar-nav navbar-right">
            <li><a href="#">用户管理</a></li>
        </ul>
    </div>

</nav>


<div class="container">
    <div class="container-fluid">
        <div class="page-header">
            <h1>订单信息</h1>
        </div>


        <div class="row-fluid">
            <%--<span> 共有 ${datas.size()} 个订单</span>--%>
            <table class="table table-striped table-bordered table-hover datatable">
                <thead>
                <tr>
                    <td class="col-md-1">编号</td>
                    <td class="col-md-1">姓名</td>
                    <td class="col-md-1">快递公司</td>
                    <td class="col-md-2">快递单号</td>
                    <td class="col-md-2">下单时间</td>
                    <td class="col-md-2">产品名称</td>
                </tr>
                </thead>
                <c:forEach items="${datas}" var="data">
                    <tr>
                        <td class="col-md-1">${data.orderSimpleId}</td>
                        <td class="col-md-1">${data.userName}</td>
                        <td class="col-md-1">${data.postCompany}</td>
                        <td class="col-md-2">${data.postNo}</td>
                        <td class="col-md-2"><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss"
                                                             value="${data.orderTime}"></fmt:formatDate></td>
                        <td class="col-md-2">${data.productName}</td>
                    </tr>
                </c:forEach>
            </table>
        </div>
    </div>

</div>
<script type="text/javascript" src="${ctx}/static/js/bootstrap.js"></script>
</body>
</html>